package db.dao;

/**
 * StuCourseId entity. @author MyEclipse Persistence Tools
 */

public class StuCourseId implements java.io.Serializable {

	// Fields

	private String stuid;
	private String courseid;
	private String teacher;

	// Constructors

	/** default constructor */
	public StuCourseId() {
	}

	/** full constructor */
	public StuCourseId(String stuid, String courseid, String teacher) {
		this.stuid = stuid;
		this.courseid = courseid;
		this.teacher = teacher;
	}

	// Property accessors

	public String getStuid() {
		return this.stuid;
	}

	public void setStuid(String stuid) {
		this.stuid = stuid;
	}

	public String getCourseid() {
		return this.courseid;
	}

	public void setCourseid(String courseid) {
		this.courseid = courseid;
	}

	public String getTeacher() {
		return this.teacher;
	}

	public void setTeacher(String teacher) {
		this.teacher = teacher;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof StuCourseId))
			return false;
		StuCourseId castOther = (StuCourseId) other;

		return ((this.getStuid() == castOther.getStuid()) || (this.getStuid() != null
				&& castOther.getStuid() != null && this.getStuid().equals(
				castOther.getStuid())))
				&& ((this.getCourseid() == castOther.getCourseid()) || (this
						.getCourseid() != null
						&& castOther.getCourseid() != null && this
						.getCourseid().equals(castOther.getCourseid())))
				&& ((this.getTeacher() == castOther.getTeacher()) || (this
						.getTeacher() != null && castOther.getTeacher() != null && this
						.getTeacher().equals(castOther.getTeacher())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getStuid() == null ? 0 : this.getStuid().hashCode());
		result = 37 * result
				+ (getCourseid() == null ? 0 : this.getCourseid().hashCode());
		result = 37 * result
				+ (getTeacher() == null ? 0 : this.getTeacher().hashCode());
		return result;
	}
}